package ru.spbu.math.seabattle.server;

import ru.spbu.math.seabattle.client.IClient;
import ru.spbu.math.seabattle.entity.Action;
import ru.spbu.math.seabattle.entity.FieldModel;
import ru.spbu.math.seabattle.entity.PlayerID;

public interface IServer {
	
	//HelloMessage
	void hello(IClient client, String myName);
	//GoodbyeMessage
	void goodbye(PlayerID myID);
	
	/**
	 * Adds the player with the specified id to the list of available for being chosen players.
	 * @param myID
	 */
	//RequestGameMessage
	void requestGame(PlayerID myID);
	//WithdrawGameMessage
	void withdrawGame(PlayerID myID);
	
	/**
	 * Requests game with the available player. 
	 * @param myID
	 * @param opponentID
	 */
	//RequestOpponentMessage
	void requestGame(PlayerID myID, PlayerID opponentID);
	//WithdrawOpponentMessage
	void withdrawGame(PlayerID myID, PlayerID opponentID);
	//AcceptGameRequestMessage
	void acceptGameRequest(PlayerID myID, PlayerID opponentID);
	//RefuseGameRequestMessage
	void refuseGameRequest(PlayerID myID, PlayerID opponentID);
	
	//MakeTurnMessage
	void makeTurn(PlayerID myID, Action action);
	
	//SetFieldMessage
	void setField(PlayerID myID, FieldModel field);
}
